<?php 
    //for personal seller
  if(!empty($_GET["decode"]))
    {
    $de = $_GET["decode"];
    $de = rtrim($de, '/');
    $de = explode('/', $de);
        $sellerid        = $de[0].'/';
    }
    else
    {
        $sellerid        = '';
    }
  //end for personal seller  
  
   if(isset($_GET['cat_id']))
   {
      $id_super = $_GET['cat_id'];      
   }
   else if(isset($_GET['cat_p']))
   {
      $id_super = $_GET['cat_p'];
   }
   else
   {
     $id_super = '';
   }
   if(isset($_GET['cat_p']))
   {
      $cat_p = $_GET['cat_p'];
   }
   
   if(isset($_GET['cat_id']))
   {
   $catid = "&amp;cat_id=".$_GET['cat_id'];
   }
   else
   {
     $catid ='' ;
   }

    $str_sele_size="SELECT DISTINCT size_id FROM tblcategory AS cate 
      INNER JOIN tblproduct_in_category AS com ON cate.id=com.category_id 
      INNER JOIN tbl_color_size AS mix ON com.product_id=mix.pid 
      WHERE cate.parent_id='".$id_super."'";
    $query_sel=mysql_query($str_sele_size);
   
     
?>

<style>
   a.mix_s_size
   {float: left; width: 40px; border:1px solid #eee;display: block;padding:5px; text-align: center;
   margin: 0 3px 3px 0;
   }
   a.mix_s_size:hover{
      background:orange;
      color:#fff;
      border-color: burlywood;
   }
   
</style>
<?php if(mysql_num_rows($query_sel)>0){?>
<br/>
<div style="width:90%; background-color:#EAEDEE; border:1px solid #eee; padding: 10px; max-height: 176px; text-align: center;"><b><!--SIZE--><?php echo $lang['SIZE'];?></b></div>
<div style="width:90%; border:1px solid #eee; padding: 10px; max-height: 77px; overflow-y: auto;">
  <?php 
     while($sel_result=mysql_fetch_array($query_sel)){
        
  ?>
   <a class="mix_s_size" href="<?php echo W_ROOT;?>/<?php echo $sellerid;?>product/?cat_p=<?php echo $cat_p?><?php echo $catid;?>&size=<?php echo $sel_result['size_id'];?>"><?php echo $sel_result['size_id'];?></a>
   
   
   <?php }?>
   
</div>   
<?php } ?>